import Vue from 'vue'
import App from './App'
import store from './store' 
import Util from './utils/util.js';
import Http from './utils/request.js'

import Lang from './utils/lang.js'
import Config from './utils/config.js'
import WxJssdk from './utils/wx-jssdk.js'

Vue.prototype.$store = store			//挂在vue
Vue.config.productionTip = true

Vue.prototype.$util = Util;
Vue.prototype.$api = Http;

Vue.prototype.$langConfig = Lang; //语言包对象
Vue.prototype.$lang = Lang.lang; //解析语言包

Vue.prototype.$config = Config;
Vue.prototype.$wx = WxJssdk;
// 公用组件
import cuCustom from './components/public/cu-custom.vue'
Vue.component('cu-custom',cuCustom)
import cuBar from './components/public/cu-bar.vue'
Vue.component('cu-bar',cuBar)
import cuHeader from './components/public/cu-header.vue'
Vue.component('cu-header',cuHeader)
import cuCell from './components/public/cu-cell.vue'
Vue.component('cu-cell',cuCell)
import cuSearch from './components/public/cu-search.vue'
Vue.component('cu-search',cuSearch)
import cuNoSearch from './components/public/cu-nosearch.vue'
Vue.component('cu-nosearch',cuNoSearch)
import more from './components/public/cu-more.vue'
Vue.component('cu-more',more)
import grids from './components/single/grid/grids.vue';
Vue.component('grids',grids)
Vue.config.productionTip = false
Vue.config.warnHandler = function (msg) {  
  if (!msg.includes('Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders.')) { // uniApp bug: https://ask.dcloud.net.cn/question/71966  
    return console.warn && console.warn(msg)  
  }  
}
App.mpType = 'app'

const app = new Vue({
	store,
    ...App
})
app.$mount()
